﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace COFE.Core.Utils
{
    public static class RegexUtils
    {
        public static bool MatchAny(string input, string[] patterns, RegexOptions options)
        {
            foreach (string pattern in patterns)
                if (Regex.Match(input, pattern, options).Success)
                    return true;
            return false;
        }

        public static bool MatchAny(string input, string[] patterns)
        {
            foreach (string pattern in patterns)
                if (Regex.Match(input, pattern).Success)
                    return true;
            return false;
        }
    }
}
